﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;

using Wicresoft.Busi.Entity;
using Wicresoft.Common;
public partial class Car_VehicleApplyList : BaseNormalPage
{
    #region Property VehicleID
    public int VehicleID
    {
        get
        {
            if (Request["VehicleID"] != null)
                return int.Parse(Request["VehicleID"].ToString());
            else
                return int.MinValue;
        }

    }
    #endregion

    protected void Page_Load(object sender, EventArgs e)
    {
        this.UseTabber = true;
        if (!IsPostBack)
        {
            this.dgApply.GotoButtonCssClass = "Button01";
            this.dgApply.GotoInputCssClass = "TextBox01";
        }
    }

    protected DataTable dgApply_OnGetData(object sender, Wicresoft.Web.UI.WebControls.GetDataEventArgs e)
    {
        //DataTable dt = DataAccess.Select(typeof(Wicresoft.JDPostBoard.Entity.vwVehicleApply), "Status='" + VehicleUseStatus.AUDIT + "' and VehicleID='" + VehicleID+"'" , "AuditTime DESC");

        int record = 0;
        DataTable dt = DataAccess.Select(typeof(Wicresoft.JDPostBoard.Entity.vwVehicleApply), e.Paging.PageIndex, e.Paging.PageSize, "Status='" + VehicleUseStatus.AUDIT + "' and VehicleID='" + VehicleID + "' and EndDate>=' " + System.DateTime.Today.ToString() + "'", "StartDate Desc", ref record);


        e.Paging.RecordCount = record;


        dt.Columns.Add("xiangxi", typeof(System.String));
        int a = 0;
        int b = 0;
        a = dt.Rows.Count;
        while (a > 0)
        {
            dt.Rows[b]["xiangxi"] = "查看详细";

            a = a - 1;
            b = b + 1;
        }

        return dt;
    }
}
